<?php
class AccessoryInfoList extends AppModel
{
    public $name = 'AccessoryInfoList';
    public $primaryKey = '_id';

    public function set_all_data($_db_name, $_data)
    {
        $this->useDbConfig = $_db_name['game_data'];
        $this->deleteAll(array('_id not' => null));

        foreach($_data as $action) {
            $this->create();
            if(!$this->save($action))
                return false;
        }
        return true;

    }
}